package cn.zifangsky.jvm.part2.threadlocal.demo2;

import cn.zifangsky.jvm.part2.threadlocal.ThreadContext;
import cn.zifangsky.jvm.part2.threadlocal.User;

/**
 * 初始化数据
 *
 * @author zifangsky
 * @date 2020/7/11
 * @since 1.0.0
 */
public class Prepare {

    /**
     * 初始化用户信息
     * @param id id
     * @param name name
     */
    public void init(int id, String name){
        User user = new User(id, name);

        ThreadContext.put(String.valueOf(id), user);
    }

}
